﻿using Dost.Khcn.Model;

namespace Dost.Khcn.Data.EntityModel
{
    public partial class Employee
    {
        public string RoleName {
            get
            {
                switch (RoleId)
                {
                    case 1:
                        return "Quản trị";
                    case 2:
                        return "Thành viên";
                    default:
                        return string.Empty;
                }
            }
        }

        public UserRole Role {
            get { if (RoleId != null) return (UserRole) RoleId;
                return UserRole.Guest;
            }
        }
    }
}
